from sqlalchemy import Column, Integer, String, Text, DateTime, func
from database import Base

class SearchInputRecord(Base):
    __tablename__ = "search_input_record"

    id = Column(Integer, primary_key=True, index=True, autoincrement=True)
    text = Column(Text, nullable=True, comment='问题')
    context = Column(Text, nullable=True, comment='知识库内容')
    answer = Column(Text, nullable=True, comment='回答')
    ip = Column(String(255), nullable=True, comment='网络IP')
    username = Column(String(255), nullable=True, comment='用户ID')
    create_time = Column(DateTime, nullable=True, server_default=func.current_timestamp(), comment='创建时间') 